<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{admin/common/common}">
<head>
    <title>奖励列表</title>
</head>

<body layout:fragment="content">
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i>
    首页
    <span class="c-gray en">&gt;</span>奖励管理 <span class="c-gray en">&gt;</span>
    奖励列表
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" >
        <i class="Hui-iconfont">&#xe68f;</i>
    </a>
</nav>
<form id="myForm" th:action="@{/reward/list}" th:method="get">
    <div class="page-container">
        <div class="text-c">
            <input type="text" class="input-text" style="width:250px" placeholder="输入奖励名称" name="rewardName" th:value="${rewardName}"/>
            <button type="submit" class="btn btn-success">
                <i class="Hui-iconfont">&#xe665;</i>
                搜奖励
            </button>
        </div>
        <div class="cl pd-5 bg-1 bk-gray mt-20">
            <span class="l">
                <!--<a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>-->
                <a href="javascript:;" th:onclick="'javascript:reward_add(\'添加奖励\',\'/reward/to/add\',\'800\',\'500\');'" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 添加奖励</a>
            </span>
            <span class="r">共有数据：<strong th:text="${pageInfo?.total}" id="total">54</strong> 条</span>
        </div>
        <table class="table table-border table-bordered table-bg table-hover">
            <thead>
            <tr>
                <th scope="col" colspan="7">奖励列表</th>
            </tr>
            <tr class="text-c">
                <!--<th width="25"><input type="rewardbox" name="" value=""/></th>-->
                <th>序号</th>
                <th>奖励名称</th>
                <th>状态</th>
                <th width="100">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr class="text-c" th:each="model:${pageInfo?.list}" th:object="${model}">
                <!--<td><input type="rewardbox" value="2" name=""/></td>-->
                <td th:text="*{rewardId}">1</td>
                <td th:text="*{rewardDesc}">d</td>
                <td class="td-status">
                    <span class="label radius label-success" th:if="*{status} eq '1'">正常</span>
                    <span class="label radius label-danger" th:if="*{status} eq '0'">删除</span>
                    <!--<span class="label radius label-success" th:unless="*{status} eq '0'">删除</span>-->
                </td>
                <td class="td-manage">
                    <a title="编辑" href="javascript:;" onclick="reward_edit('奖励编辑','reward-add.html','2','800','500')" th:onclick="'javascript:reward_edit(\'奖励编辑\',\'/reward/edit/'+*{rewardId}+'\',\'800\',\'500\');'" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6df;</i></a>
                    <span th:if="*{status} eq '1'"><a title="删除" href="javascript:;" onclick="reward_del(this,'0')" th:onclick="'javascript:reward_del(0, \'/reward/status/'+*{rewardId}+'\');'" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a></span>
                    <span th:if="*{status} eq '0'"><a title="还原" href="javascript:;" onclick="reward_del(this,'1')" th:onclick="'javascript:reward_del(1, \'/reward/status/'+*{rewardId}+'\');'" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe66b;</i></a></span>
                </td>
            </tr>
            </tbody>
        </table>
        <div th:replace="admin/common/page :: page"></div>
    </div>
</form>

<script type="text/javascript" th:src="@{/js/page.js}"></script>
<script type="text/javascript" th:src="@{/js/admin/check/reward-list.js}"></script>
<script th:inline="javascript">

</script>
</body>
</html>